// pages/record_detail/record_detail.js
var util = require("../../utils/util.js")

Page({
  data: {
    record: {}
  },
  onLoad: function(options) {
    let that = this
    wx.cloud.callFunction({
        name: 'getRegistration',
        data: {
          id: options.id
        }
      })
      .then(res => {
        res.result.list[0].time = util.formatTime(new Date(res.result.list[0].time), 0)
        that.setData({
          record: res.result.list[0]
        })
      })
  }
})